//
//  TTCalculatorViewCell.m
//  TaoTuo
//
//  Created by admin on 2020/2/4.
//  Copyright © 2020 admin. All rights reserved.
//

#import "TTCalculatorViewCell.h"

@interface TTCalculatorViewCell ()

@property (nonatomic, strong) UILabel *titleLabel;

@end

@implementation TTCalculatorViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.backgroundColor = UIColorHex(F0F4F7);
        _titleLabel = [UILabel labelTextCenterWithTitle:@"" color:UIColorHex(333333) fontSize:15];
        _titleLabel.frame = self.bounds;
        [self addSubview:_titleLabel];
        
        
    }
    return self;
}

- (void)setTitle:(NSString *)title
{
    _title = title;
    self.titleLabel.text = title;
}

- (void)setSelected:(BOOL)selected
{
    [super setSelected:selected];
    
    if (selected) {
        self.backgroundColor = kMainColor;
        self.titleLabel.textColor = [UIColor whiteColor];
    } else {
        self.backgroundColor = UIColorHex(F0F4F7);
        self.titleLabel.textColor = UIColorHex(333333);
    }
    
}

@end
